package day12.innera;

/**
 * @author oldliu
 * @since 1.0
 */
public class Noname {
    public static void main(String[] args) {
        Thread t=new Thread("线程1"){
            @Override
            public void run() {
                for(int i=1;i<=20;i++)
                    System.out.println(getName()+" print : "+i);
            }
        };
        t.start();

        Thread t2=new Thread(new Runnable() {
            @Override
            public void run() {
                for(int i=1;i<=20;i++)
                    System.out.println(Thread.currentThread().getName()+" print : "+i);
            }
        });
        t2.start();
    }
}
